package com.wm.dao;

import java.util.List;

import com.wm.bean.User;
import com.wm.service.web.Pages;

/**
 * @author yangbo
 *
 * 2012-12-26
 */
public interface UserDAO {
	
	/**
	 * 保存
	 * @param u
	 * @return
	 */
	public User saveUser(User u);
	
	/**
	 * 修改
	 * @param u
	 * @return
	 */
	public User updateUser(User u);
	
	/**
	 * 删除
	 * @param u
	 */
	public void removeUser(User u);
	
	/**
	 * 根据ID查询
	 * @param id
	 * @return
	 */
	public User findUserById(long id);
	
	/**
	 * 根据用户名密码查询
	 * @param userName
	 * @param userPwd
	 * @return
	 */
	public User findUserByUserNameUserPwd(String userName,String userPwd);
	
	/**
	 * 
	 * @return
	 */
	public List findUser();
	
	/**
	 * 根据用户名查询
	 * @param userName
	 * @return
	 */
	public User findUserByUserName(String userName);
	
	public List findUsersByUserNameValidIsShow(String userName,int valid,int isShow,String orderby,int ascOrDesc,int firstResult,int maxResults);
	
	public long getUserNumByUserNameValidIsShow(String userName,int valid,int isShow);
	
}
